package com.kaisheng.util;

public class SizeUtil {

	public static String getSize(String size){
		long s =Long.parseLong(size);
		if(s<1024){
			return s+"B";
		}else if(s<(1024*1024)){
			s=s/1024;
			return s+"KB";
		}else if(s<(1024*1024*1024)){
			s=s/1024/1024;
			return s+"MB";
		}else{
			return s+"";
		}
		
		
	}
}
